home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / dos_win / winsock / maillist / 94-02.Z / 94-02 / text0249.txt < prev    next >
Encoding:
Text File  |  1994-02-28  |  17.6 KB  |  430 lines

  1. Does anyone know of an rsh client for WinSock?  
  2.  
  3. Chris Rath
  4. car@mozart.att.com
  5. From towfiq@suneast.east.sun.com Wed Feb 23 14:12:07 1994
  6. Received: from Sun.COM by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  7.           id AA28304; Wed, 23 Feb 1994 09:13:04 -0500
  8. Received: from East.Sun.COM (east.East.Sun.COM) by Sun.COM (4.1/SMI-4.1)
  9.     id AB21301; Wed, 23 Feb 94 06:13:01 PST
  10. Received: from suneast.East.Sun.COM by East.Sun.COM (4.1/SMI-4.1)
  11.     id AA15975; Wed, 23 Feb 94 09:12:57 EST
  12. Received: from oaktree.East.Sun.COM by suneast.East.Sun.COM (4.1/SMI-4.1)
  13.     id AA13447; Wed, 23 Feb 94 09:12:59 EST
  14. Received: by oaktree.East.Sun.COM (5.0/SMI-SVR4)
  15.     id AA28777; Wed, 23 Feb 1994 09:12:07 +0500
  16. Date: Wed, 23 Feb 1994 09:12:07 +0500
  17. From: towfiq@suneast.east.sun.com (Mark Towfiq - SunSelect)
  18. Message-Id: <9402231412.AA28777@oaktree.East.Sun.COM>
  19. To: winsock@sunsite.unc.edu
  20. In-Reply-To: <tardiff.132.2D6B3715@halcyon.com>
  21. Subject: Re: FAQ for Winsock?
  22. Content-Length: 15600
  23.  
  24. In article <1994Feb22.233136.8138@jupiter.sun.csd.unb.ca>
  25. i4n1@jupiter.sun.csd.unb.ca (Eric Versloot) writes:
  26.  
  27. >> I was wondering if there is a FAQ for Winsock and I was hoping
  28. >> someone could direct me to it.  If not is there some other way to
  29. >> get some information on Winsock?
  30.  
  31.              Frequently Asked Questions About
  32.             Windows Sockets Version 1.1
  33.                    08 Dec 1993
  34.  
  35.   This FAQ has been put together by Mark Towfiq, with much-appreciated
  36. assistance from Jay Allard, Bruce Backman, Paul Brooks, Martin Hall,
  37. Simon Hewison, Mike Morse, Bob Quinn, Ed Schwalenberg, Bill Tang, Dave
  38. Treadwell, and Fred Whiteside.  If you have any modifications to this
  39. FAQ, send them to towfiq@East.Sun.Com, and I will fold them into the
  40. next revision.
  41.  
  42.   First of all, the questions:
  43.  
  44. 1.    What is Windows Sockets?
  45. 2.    What is the latest version?
  46. 3.    When is the next rev of the specification?  Why not sooner?
  47. 4.    Where can I get a/the WINSOCK.DLL?
  48. 5.    Why isn't there just one WINSOCK.DLL?  Do I need a TCP/IP already to
  49.       use it?
  50. 6.    Where can I contact Windows Sockets application and implementation
  51.       vendors?  (include list of address, phone contacts)
  52. 7.    Where can I get sample apps and tests?
  53. 8.    Will Windows Sockets be in _____?
  54. 8.1.  Will Windows Sockets be in Windows NT?
  55. 8.2.  Will Windows Sockets be in Windows for Workgroups?
  56. 8.3.  Will Windows Sockets be in DOS?
  57. 8.4.  Will Windows Sockets be in Unix?
  58. 8.5.  Will Windows Sockets be in Win32s?
  59. 9.    What about standard APIs for ____?
  60. 9.1.  What about standard APIs for FTP?
  61. 9.2.  What about standard APIs for Telnet?
  62. 9.3.  What about standard APIs for SNMP?
  63. 9.4.  What about standard APIs for RPC?
  64. 9.5.  What about standard APIs for TLI/XTI?
  65. 10.1. Does Windows Sockets work over protocols other than TCP/IP?
  66. 10.2. Will it?
  67. 11.   Why no SOCK_RAW?
  68. 12.   Why isn't it possible to share sockets between tasks?
  69. 13.1. How do I get my IP address?
  70. 13.2. Why no SIOCGIFADDR?
  71. 14.   When should I use blocking vs. nonblocking sockets?
  72. 15.   What about other socket options that BSD supports?  Ioctls?
  73. 16.   How can I get the local username?
  74. 17.   Do I need to initialize the WSAData structure before calling
  75.       WSAStartup?
  76. 18.   If I write a Windows Sockets program for DOS, will I be able to
  77.       communicate with a Sockets program on UNIX?
  78. 19.   Is it possible to create sockets that map to a dll rather than an
  79.       application?  I have tried a WSAStartup() as part of my LibMain, but
  80.       the sockets that are created are owned by the application, not by the
  81.       DLL. It would be desirable for me to have some of the sockets that
  82.       are opened have "A Global (DLL wide) Scope".
  83. 20.   A *Class* of questions that could be answered are related to porting
  84.       extant BSD applications to Windows Sockets: "How to I implement the
  85.       xxxx function call in my Windows Sockets application?" (e.g. fcntl(),
  86.       readv(), etc).
  87. 21.   Is there a Pascal/Visual Basic/Visual Cobol header file for Windows
  88.       Sockets?
  89. ----------------------------------------------------------------------
  90. 1.  What is Windows Sockets?
  91.  
  92. Answer: The Windows Sockets specification defines a network programming
  93. interface for Microsoft Windows which is based on the "socket" paradigm
  94. popularized in the Berkeley Software Distribution (BSD) from the University
  95. of California at Berkeley.  It encompasses both familiar Berkeley socket
  96. style routines and a set of Windows-specific extensions designed to allow
  97. the programmer to take advantage of the message-driven nature of Windows.
  98.  
  99. The Windows Sockets Specification is intended to provide a single API to
  100. which application developers can program and multiple network software
  101. vendors can conform.  Furthermore, in the context of a particular version
  102. of Microsoft Windows, it defines a binary interface (ABI) such that an
  103. application written to the Windows Sockets API can work with a conformant
  104. protocol implementation from any network software vendor.  This
  105. specification thus defines the library calls and associated semantics to
  106. which an application developer can program and which a network software
  107. vendor can implement.
  108.  
  109. Network software which conforms to this Windows Sockets specification will
  110. be considered "Windows Sockets Compliant".  Suppliers of interfaces which
  111. are "Windows Sockets Compliant" shall be referred to as "Windows Sockets
  112. Suppliers".  To be Windows Sockets Compliant, a vendor must implement 100%
  113. of this Windows Sockets specification.
  114.  
  115. Applications which are capable of operating with any "Windows Sockets
  116. Compliant" protocol implementation will be considered as having a "Windows
  117. Sockets Interface" and will be referred to as "Windows Sockets
  118. Applications".
  119.  
  120. 2.  What is the latest version?
  121.  
  122. Answer: The latest version of the specification is 1.1.
  123.  
  124. 3.  When is the next rev of the specification?  Why not sooner?
  125.  
  126. Answer: The next rev. (2.0) will not be until towards the end of 1993.  We
  127. need 1.1 of the API to become firmly settled and implemented first.
  128.  
  129. 4.  Where can I get a/the WINSOCK.DLL?
  130.  
  131. Answer: You can most probably get one from the same place you got your
  132. TCP/IP software from.
  133.  
  134. 5.  Why isn't there just one WINSOCK.DLL?  Do I need a TCP/IP already
  135.     to use it?
  136.  
  137. Answer: The Windows Sockets specification defines the top level of the DLL,
  138. the part which is called by user programs.  The method a given WINSOCK.DLL
  139. will use to access TCP/IP (or NetWare, or AppleTalk, or DECNet ...) depends
  140. on the networking package you have installed, and therefore must vary.  A
  141. WINSOCK.DLL is therefore just an interface to whatever existing protocol
  142. you already have installed.  An illustration would help:
  143.  
  144.        +---------------------------------+
  145.        |  WinSock compliant application  |
  146.        +---------------------------------+
  147.        +---------------------------------+ <--- WinSock API
  148.        |       Windows Sockets DLL       |
  149.        +---------------------------------+
  150.        +---------------------------------+ <--- Protocol Stack API
  151.        |   Protocol Stack (e.g. TCP/IP)  | (typically proprietary)
  152.        +---------------------------------+
  153.        +---------------------------------+ <--- Hardware Driver API
  154.        |        Hardware Driver          |   (Packet Driver, NDIS, ODI,
  155.        +---------------------------------+    or proprietary)
  156.        +---------------------------------+ <--- Hardware Interface
  157.        |   Network (hardware) Interface  |    (hardware specific)
  158.        +---------------------------------+
  159.                        |
  160.                        +----> network
  161.  
  162. 6.  Where can I contact Windows Sockets application and implementation
  163. vendors?  (include list of address, phone contacts)
  164.  
  165. Answer:
  166.  
  167.     Date: Tue, 6 Apr 93 12:53:37 PDT
  168.     From: tang@documentum.com (Bill Tang)
  169.     To: winsock@Microdyne.COM
  170.     Subject: vendor list (long)
  171.  
  172.     Thanks to all that responded to my previous inquiry of vendor
  173.     implementations. I am posing a summary and will keep the list updated
  174.     if I receive more information.
  175.     -------------------------------------------------------------------------
  176.     SUMMARY
  177.     -------------------------------------------------------------------------
  178.              (old list at 11/23/92)
  179.     Company              BETA    FINAL    Update (4/6/93)
  180.     -------------------------------------------------------------------------
  181.     3Com Corp            Q1'93  Q2'93    ?
  182.     Beame & Whiteside    Q2'93  Shipping    Shipping v1.1 DLL with stack
  183.     Distinct Corp        Q3'92  Shipping    ?
  184.     FTP Software         Q4'92  Shipping    shipping v1.1 TCP/IP stack
  185.                         with DLL; DLL
  186.                         available on BBS or
  187.                         anonymous-ftpable on
  188.                         vax.ftp.com;
  189.                         Development Kit being
  190.                         updated to include
  191.                         v1.1 Windows Sockets
  192.                         support.
  193.  
  194.     Frontier Tech        Q3'92  Shipping    ?
  195.     IBM                  Q4'92  Q1'92        ?
  196.     JSB Corporation      Q4'92  Q4'92        ?
  197.     Lan Design           Q4'92  Q1'93        ?
  198.     Lanera Corp                    Shipping v1.1 TCP/IP stack
  199.     Microdyne            Q4'92  Q1'93        ?
  200.     Microsoft(W NT 32b)  Q3'92  Q2'93        Win32 SDK March release 
  201.     Microsoft(W NT 16b)  Q4'92  Q2'93        Win32 SDK March release 
  202.     Microsoft(W 3.x 16b) Q4'92  Q2'93        ?
  203.     NetManage            Q4'92  Q4'92        shipping v1.1 DLL
  204.     Network Research      ?       ?        ?
  205.     Novell                ?       ?        ?
  206.     Spry                    (stack) supports Winsock v1.1
  207.     Sun Microsystems     Q4'92  1stHalf'93    ?
  208.     Ungermann Bass        ?       ?        v1.1 TCP/IP stack and DLL: 
  209.                             Beta Q1'93, Final Q2'93
  210.     Walker Richer Quinn  Q4'92  Q1'93    ?
  211.     Wollongong           Q4'92  Q1'93    ?
  212.  
  213. 7.  Where can I get sample applications and tests?
  214.  
  215. Answer: Files and information related to the Windows Sockets API are
  216. available via FTP (user: "anonymous", password: your e-mail address)
  217. on the host SunSite.UNC.EDU, in /pub/micro/pc-stuff/ms-windows/winsock.
  218. Note: if you do not have FTP access to the Internet, send a message
  219. with the word "help" in the body to either ftpmail@SunSite.UNC.Edu, or
  220. ftpmail@DECWRL.DEC.Com (in the UK mail to ftpmail@doc.ic.ac.uk), to
  221. obtain information about the FTP to Mail service there.
  222.  
  223. 8.  Will Windows Sockets be in _____?
  224.  
  225. 8.1.  Will Windows Sockets be in Windows NT?
  226.  
  227. Answer: Yes.  In 16 and 32-bit versions.
  228.  
  229. 8.2.  Will Windows Sockets be in Windows for Workgroups?
  230.  
  231. Answer: Yes.
  232.  
  233. 8.3.  Will Windows Sockets be in DOS?
  234.  
  235. Answer: Paul Brooks of TurboSoft (paul@abccomp.oz.au) tells me:
  236.  
  237.     As for a Windows Sockets for DOS - we have a library that is
  238.     pretty much complete. The goal was to produce a DOS library and
  239.     Binary API which would allow developers to code applications using
  240.     the Windows Sockets 1.1 spec. and have it run exactly the same
  241.     under DOS as Windows - blocking and non-blocking modes,
  242.     Asynchronous calls, the works. Apart from some AsyncGetXXXbyYYY
  243.     calls the rest works, although it is not possible to capture all
  244.     the Windows-specific semantics of some areas.
  245.  
  246. I am sure you can contact him for more information.  JSB also has a
  247. standardized Berkeley Sockets API for DOS which provides access to all
  248. TCP/IP implementations.
  249.  
  250. 8.4.  Will Windows Sockets be in UNIX?
  251.  
  252. Answer: Well, since it came from BSD UNIX, there's not much need.
  253.  
  254. 8.5.  Will Windows Sockets be in Win32-S?
  255.  
  256. Answer: Yes, Win32s 1.1 contains a thunking layer that converts 32-bit
  257. Windows Sockets calls to 16-bit Windows Sockets.  It should work on
  258. top of any 16-bit WINSOCK.DLL.
  259.  
  260. 9.  What about standard APIs for ____?
  261.  
  262. 9.1.  What about standard APIs for FTP?
  263.  
  264. Answer: Not yet.
  265.  
  266. 9.2 What about standard APIs for Telnet?
  267.  
  268. Answer: Not yet.
  269.  
  270. 9.3 What about standard APIs for SNMP?
  271.  
  272. Answer: In the works.  Send e-mail to listserv@SunSite.UNC.EDU with
  273. "subscribe winsnmp" in the body of the message to join the list.
  274.  
  275. 9.4 What about standard APIs for RPC?
  276.  
  277. Answer: Microsoft will be providing an implementation of DCE RPC.  Also in
  278. the works is the definition of a standard implementation of ONC RPC (known
  279. as RPC for Windows) which will be made available by multiple vendors.  To
  280. contribute to the discussion, send email to rpc4win@wco.ftp.com.
  281.  
  282. 9.5 What about standard APIs for TLI/XTI?
  283.  
  284. Answer: No, not yet.  Vendors chose to do Windows Sockets because of the
  285. sockets application and knowledge base, however anyone out there is free to
  286. try a Windows TLI/XTI Specification.
  287.  
  288. 10.1.  Does Windows Sockets work over protocols other than TCP/IP?
  289.  
  290. Answer: Yes, it does.  But we know of no vendors supplying one currently.
  291.  
  292. 10.2.  Will it?
  293.  
  294. Answer: Yes.  Windows NT will include mechanisms for multiple protocol
  295. support in Windows Sockets, both 32-bit and 16-bit.
  296.  
  297. 11.  Why no SOCK_RAW?
  298.  
  299. Answer: SOCK_RAW is optionally implemented by many major Windows Sockets
  300. vendors.  It is not mandated now because: 1) not every stack vendor can
  301. supply a complete SOCK_RAW interface, and 2) we did not have time to define
  302. the minimal subset every vendor could provide (e.g. maybe just ICMP).
  303.  
  304. 12.  Why isn't it possible to share sockets between tasks?
  305.  
  306. Answer: The real answer is that it wasn't considered sufficiently important
  307. for 1.1, but is high on the list for inclusion in 2.0.
  308.  
  309. 13.1.  How do I get my IP address?
  310.  
  311. Answer: Do a gethostbyname() on the output from gethostname().
  312.  
  313. 13.2.  Why no SIOCGIFADDR?
  314.  
  315. Answer: It was not included because there were concerns it could not be
  316. supported across platforms.  It may be included in version 2.0 of the spec.
  317.  
  318. 14.  When should I use blocking vs. non-blocking sockets?
  319.  
  320. Answer: Try to use non-blocking sockets whenever possible; certainly if you
  321. are coding a Windows application from scratch.  Blocking sockets should
  322. only be used when trying to maintain portability between UNIX/MS-DOS and
  323. Windows.
  324.  
  325. 15.  What about other socket options that BSD supports?  Ioctls?
  326.  
  327. Answer: Some vendors may support them.  Do not rely on ones not explicitly
  328. mentioned in the specification, however.
  329.  
  330. 16.  How can I get the local username?
  331.  
  332. Answer: Based on a suggestion from Simon Hewison
  333. (p0063886@cs3.oxford-brookes.ac.uk), one idea is to call WNetGetUser()
  334. in the NETWORK.DRV.  If a vendor has supplied a NETWORK.DRV then this
  335. will work, if not you can just use some other method.  Thus you could
  336. write a bit of code thus:
  337.  
  338.     WNetGetUser(szNetUserId,sizeof(szNetUserId);
  339.     if (strlen(szNetUserId)==0) {
  340.         /* call some other method of getting
  341.            userid, eg. the lan manager call NetWkstaGetInfo */
  342.     }
  343.  
  344.   Information on this API call is in the Windows Device Driver Adaption
  345. Guide.
  346.  
  347. 17.  Do I need to initialize the WSAData structure before calling
  348. WSAStartup?
  349.  
  350. Answer: No, WSAStartup does not retrieve the contents of the WSAData
  351. structure pointed to, it fills it in.
  352.  
  353. 18.  If I write a Windows Sockets program, will I be able to communicate
  354. with a Sockets program on UNIX or any other non Windows platform?
  355.  
  356. Answer: Absolutely!  This common question is the result of confusing
  357. protocols with the APIs; communicating programs need not have been
  358. created with the same APIs, as long as they are using the same
  359. (transport & network) protocols.
  360.  
  361. 19.  Is it possible to create sockets that map to a dll rather than an
  362. application?  I have tried a WSAStartup() as part of my LibMain, but the
  363. sockets that are created are owned by the application, not by the DLL. It
  364. would be desirable for me to have some of the sockets that are opened have
  365. "A Global (DLL wide) Scope".
  366.  
  367. Answer: The way this situation has been dealt with by developers is to have
  368. your DLL create a "helper process" which will perform all Windows Sockets
  369. operations on behalf of your applications (thereby having all sockets owned
  370. by the helper process' task).
  371.  
  372. 20.  A *Class* of questions that could be answered are related to porting
  373. extant BSD applications to Windows Sockets: "How to I implement the xxxx
  374. function call in my Windows Sockets application?" (e.g. fcntl(), readv(),
  375. etc).
  376.  
  377. Answer: In general, you will have to code such functions yourself, although
  378. it would not hurt to suggest them for the next revision of the
  379. specification as well.
  380.  
  381. 21.  Is there a Pascal/Visual Basic/Visual Cobol header file for Windows
  382. Sockets?
  383.  
  384. Answer: The Pascal and Visual Basic forms are already in the FTP
  385. archive.  Look there for any other header files that people may have
  386. developed so far.  It should be pointed out that not all the Winsock
  387. functions can be called from Visual Basic and the subset that can be
  388. called are not really enough for a true app (for example, you can't
  389. call gethostbyname()).  To use Winsock from VB requires a translation
  390. DLL that will probably have to be written in C.  To date, there is no
  391. public domain implementation, although several vendors have announced
  392. toolkits for Winsock for VB.
  393. From news@bigblue.oit.unc.edu Wed Feb 23 14:04:45 1994
  394. Received: from bigblue.oit.unc.edu by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  395.           id AA00409; Wed, 23 Feb 1994 09:27:25 -0500
  396. Received: by bigblue.oit.unc.edu (AIX 3.2/UCB 5.64/4.03)
  397.           id AA16793; Wed, 23 Feb 1994 09:19:20 -0500
  398. Received: from GATEWAY by bigblue with netnews
  399.     for winsock@sunsite.unc.edu (winsock@sunsite.unc.edu)
  400. To: winsock@sunsite.unc.edu
  401. Date: Wed, 23 Feb 1994 14:04:45 GMT
  402. From: ghamer@superior.ccs.carleton.ca (Geoff Hamer)
  403. Message-Id: <ghamer.762012285@superior>
  404. Organization: Carleton University
  405. Sender: ses
  406. Subject: Trumpet Winsock and the Dialer.
  407.  
  408. Hi,
  409.  
  410. I'm having trouble getting the dialer in Trumpet Winsock to send
  411. commands to my modem. I have an external 9600baud modem on COM1. The
  412. modem works with many other applications in windows but not with
  413. Winsock.
  414.  
  415. I have been trying to get the login.cmd script to work but I don't
  416. even get a flicker from the modem lights when the script executes an
  417. 'output' command. 
  418.  
  419. I have also tried the 'manual dial' option. What is the deal with
  420. this? When I select it I get a flashing cursor in the Winsock window
  421. but I'm unable to type anything but the <ESC> key.
  422.  
  423. I the 'External Slip' box selected and I have tried getting things to
  424. work with the 'Hardware Handshake' box on and off. I'm assuming I just
  425. have something set incorrectly. Anyone know what?
  426.  
  427. Geoff
  428.  
  429.  
  430.